#ifndef _LOGGER_H_
#define _LOGGER_H_

#include <iostream>
#include <list>

void Log(const wchar_t* msg,...);
void Log(const char* msg,...);
void SquirrelLog(HSQUIRRELVM, const wchar_t* msg,...);

class Logger
{
friend void Log(const wchar_t* msg,...);
friend void Log(const char* msg,...);
friend void SquirrelLog(HSQUIRRELVM, const wchar_t* msg,...);
public:
	Logger();
	~Logger();
	void addTarget(std::wostream& target);
	void log(const wchar_t* msg);
	void log(const char* msg);
private:
	std::list<std::wostream*> targets;
	static Logger* instance;
};

#endif